package com.yamvc.mvc.controller
{
	import flash.events.EventDispatcher;

	public class Controller extends EventDispatcher
	{
		private static var _instance:Controller;
		public static function get instance():Controller{
			if(_instance==null) _instance = new Controller();
			return _instance;
		}
		
		public function Controller(){
			super();
			if(_instance!=null) throw new Error("Singleton error!!");
		}
		
		public function executeAction(action:IAction):void{
			action.execute();
		}
		
	}
}